Fix build with system litehtml
authorRob Savoury <savoury@savos.tech>
Tue, 23 Aug 2022 20:39:08 +0000 (13:39 -0700)
committerPatrick Franz <deltaone@debian.org>
Fri, 30 Dec 2022 15:59:08 +0000 (16:59 +0100)
commita3e9d29bb3d23dbc2c8f20b9b724c0d6c932f0e8
tree3f2d280730172ec9b9b15fed02bcf8c1a101d991
parent8b1ebc82ee6427e458dc4d0808fda91b59802714
Fix build with system litehtml

CMake errors out when using system litehtml (which depends on gumbo) due being
unable to set definitions for libraries not built by the Qt6 Tools project:

 CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6/QtFlagHandlingHelpers.cmake:171 (target_compile_definitions):
   Cannot specify compile definitions for target "litehtml" which is not built
   by this project.
 Call Stack (most recent call first):
   src/assistant/CMakeLists.txt:34 (qt_internal_set_exceptions_flags)

 CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6/QtFlagHandlingHelpers.cmake:190 (get_target_property):
   get_target_property() called with non-existent target "litehtml".
 Call Stack (most recent call first):
   src/assistant/CMakeLists.txt:35 (qt_disable_warnings)

 CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6/QtFlagHandlingHelpers.cmake:190 (get_target_property):
   get_target_property() called with non-existent target "gumbo".
 Call Stack (most recent call first):
   src/assistant/CMakeLists.txt:37 (qt_disable_warnings)

Also, litehtml > 0.5 reorganises the headers into a litehtml sub-directory
(this build is with exactly litehtml 0.5+git20211028, the same version found
in Qt6 Tools source code). Fix the build by removing attempts to set Qt defs
for litehtml/gumbo and by using the new path to the primary header.

Gbp-Pq: Name fix-build-with-system-litehtml.patch
src/assistant/CMakeLists.txt
src/assistant/qlitehtml/src/container_qpainter_p.h